home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Light ROM 3
/
Light ROM 3 - Disc 2.iso
/
programs
/
amiga
/
dps
/
par252.lha
/
rexx
/
CopySelect.ddr
< prev
next >
Wrap
Text File
|
1994-12-02
|
1KB
|
57 lines
/*
Program to copy specific contents (found in the file 'ram:temp'
of one PAR drive to another
Requires PAR 2.06 or higher
To create the file 'temp' in ram, issue the following command at
the command line:
List >ram:temp (drive) LFORMAT %p%s FILES ALL
where (drive) is the path such as DD0: to get all the file information
for.
Edit the file ram:temp by removing the lines containing files you do
not want copied from one par drive to another, and save the file.
Then run the PAR program and hit the f5 key to invoke this arexx script.
*/
address DDR
/*address command List >ram:temp dd1: LFORMAT %s
*/
file_list1 = 'ram:temp'
if open('myfile',file_list1,'READ') then do
do while ~EOF('myfile')
ff_name = readln('myfile')
address command 'makedir dd1:'||ff_name
end
call close('myfile')
end
file_list = 'ram:temp'
if open('myfile',file_list,'READ') then do
do while ~EOF('myfile')
ff_name = readln('myfile')
ff_name_len = length(ff_name)
f_dest_path = 'dd1:'||right(ff_name,ff_name_len-4)
dest_path_len = index(f_dest_path,'/') - 1
dest_path = left(f_dest_path,dest_path_len)
copy ff_name dest_path
end
call close('myfile')
end
else
say 'cant open file'
EXIT